<include file='Common:header' />
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
	<!-- #section:basics/sidebar -->
	<include file='Common:left' />
	<!-- /section:basics/sidebar -->
	<div class="main-content">
		<div class="main-content-inner">
			<div class="page-content">


				<div class="row">
					<div class="col-xs-12">
						<div>
							<table class="table table-striped table-bordered table-hover" id="dynamic-table">
								<thead>
								<tr>
									<th>留言人姓名</th>
									<th class="hidden-sm hidden-xs">留言人邮箱</th>
									<th>留言内容</th>
									<th class="hidden-sm hidden-xs">留言时间</th>
									<th style="border-right:#CCC solid 1px;">操作</th>
								</tr>
								</thead>

								<tbody>

								<foreach name="plug_sug" item="v">
									<tr>
										<td height="28">{$v.plug_sug_name}</td>
										<td class="hidden-sm hidden-xs">{$v.plug_sug_email}</td>
										<td>{$v.plug_sug_content}</td>
										<td class="hidden-sm hidden-xs">{$v.plug_sug_addtime|date='Y-m-d',###}</td>
										<td>
											<div class="action-buttons">
												<a class="red del" href="{:U('plug_sug_del',array('plug_sug_id'=>$v['plug_sug_id'],'p'=>I('p',1)))}" title="删除">
													<i class="ace-icon fa fa-trash-o bigger-130"></i>											</a>											</div>
										</td>
									</tr>
								</foreach>
								<tr>

								</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>

				<include file='Common:header_nav' />

			</div><!-- /.page-content -->
		</div>
	</div><!-- /.main-content -->

	<script>
		$(function(){
			//删除操作
			var $del = $(".del");
			$del.click(function(){
				var $url=this.href;
				layer.confirm('你确定要删除吗？', {icon: 3}, function(index){
				layer.close(index);
				$.get($url, function(data){
					if(data.status){
						layer.alert(data.info, {icon: 6}, function(index){
							layer.close(index);
							window.location.href=data.url;
						});
					} else {
						layer.alert(data.info, {icon: 5}, function(index){
							layer.close(index);
							//window.location.href="{:U('we_menu_list')}";
						});
					}
				}, "json");
				});
				return false;
			});
		});
		//修改模态框状态
		$(document).ready(function(){
			$("#myModaledit").hide();
			$("#gb").click(function(){
				$("#myModaledit").hide(200);
			});
			$("#gbb").click(function(){
				$("#myModaledit").hide(200);
			});
			$("#gbbb").click(function(){
				$("#myModaledit").hide(200);
			});
		});

		function plug_sug_edit(val){
			$.post('{:U("plug_sug_edit")}',
					{plug_sug_id:val},
					function(data){
						if(data.status==1){
							$(document).ready(function(){
								$("#myModaledit").show(300);
								$("#editplug_sug_id").val(data.plug_sug_id);
								$("#editplug_sug_title").val(data.plug_sug_title);
								$("#editplug_sug_email").val(data.plug_sug_email);
								$("#editplug_sug_addtime").val(data.plug_sug_addtime);
							});
						}else{

						}
					});
			return false;
		}

	</script>
	<include file='Common:footer' />

</div><!-- /.main-container -->
</body>
</html>
